//
//  CUploadView.h
//  HCHK_iphone
//
//  Created by yilong zhang on 12-1-10.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "CUploadPageCtrl.h"
#import "CCitySelector.h"
#import "CWaterFall.h"

@class CUploadView;

//============================================================================================================================

@protocol UploadViewDelegate <NSObject>

@optional
-(void)DidUploadViewActived:(UIView*)view Command:(int)command Value1:(id)value1 Value2:(id)value2;

@end

//============================================================================================================================

@interface CUploadView : UIView<UITextFieldDelegate, UIAlertViewDelegate, CitySelectorProtocal, UITextViewDelegate, WaterFallDelegate>

@property (nonatomic, assign) id<UploadViewDelegate>    delegate;

@property (nonatomic, assign) UIView        *m_TableView;
@property (nonatomic, assign) UITextField   *m_Name;
@property (nonatomic, assign) UITextField   *m_Addr;
@property (nonatomic, assign) UIButton      *m_AddrBtn;
@property (nonatomic, assign) UITextField   *m_ResName;
@property (nonatomic, assign) int           m_Type;         //0-shoudong,1-zidong
@property (nonatomic, assign) CAddrInfo     *m_AddrInfo;
@property (nonatomic, assign) UIImageView   *m_Image;
@property (nonatomic, assign) UILabel       *m_ImgCnt;
@property (nonatomic, assign) UIView        *m_ImgListPanel;
@property (nonatomic, assign) CWaterFall    *m_ImgList;
@property (nonatomic, assign) UITextView    *m_Sum;
@property (nonatomic, assign) UIButton      *m_Commit;
@property (nonatomic, assign) UIView        *m_SharePanel;
@property (nonatomic, assign) UIImageView   *m_ShareCur;
@property (nonatomic, assign) int           m_nShareType;
@property (nonatomic, assign) BOOL          m_bIsDraft;

-(void)CancelUpload;
-(void)OnCommitButtonDown:(UIButton*)sender;
-(void)CommitUpload;
-(void)OnButtonDown:(UIButton*)sender;
-(void)TextFieldValueChanged:(UITextField*)textfield;
//-(void)SegClicked:(UISegmentedControl*)seg;
-(void)SegClicked:(UIButton*)seg;
-(void)OnShareBtnDown:(UIButton*)sender;
-(void)WaterFallHidden;

@end

